//
//  WMEHeight.m
//  WMEMusic
//
//  Created by 恩叔 on 16/4/25.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMEHeight.h"

@implementation WMEHeight
//计算文本高
+ (CGFloat)heightWithText:(NSString *)text FontOfSize:(CGFloat )fontOfSize MySize:(CGSize)size
{
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:fontOfSize]};
    //计算 文本 需的rectangular
    CGRect r = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    //返回文本 的 高
    return r.size.height;
}
@end
